home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / utility1 / gs261src.zip / X_.H < prev    next >
C/C++ Source or Header  |  1993-05-13  |  6KB  |  146 lines

  1. /* Copyright (C) 1989, 1992, 1993 Aladdin Enterprises.  All rights reserved.
  2.  
  3. This file is part of Ghostscript.
  4.  
  5. Ghostscript is distributed in the hope that it will be useful, but
  6. WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  7. to anyone for the consequences of using it or for whether it serves any
  8. particular purpose or works at all, unless he says so in writing.  Refer
  9. to the Ghostscript General Public License for full details.
  10.  
  11. Everyone is granted permission to copy, modify and redistribute
  12. Ghostscript, but only under the conditions described in the Ghostscript
  13. General Public License.  A copy of this license is supposed to have been
  14. given to you along with Ghostscript so you can know your rights and
  15. responsibilities.  It should be in a file named COPYING.  Among other
  16. things, the copyright notice and this notice must be preserved on all
  17. copies.  */
  18.  
  19. /* x_.h */
  20. /* Header for including X library calls in Ghostscript X11 driver */
  21.  
  22. #ifdef VMS
  23.  
  24. #  ifdef __GNUC__
  25.  
  26. /*   Names of external functions which contain upper case letters are
  27.  *   modified by the VMS GNU C compiler to prevent confusion between
  28.  *   names such as XOpen and xopen.  GNU C does this by translating a
  29.  *   name like XOpen into xopen_aaaaaaaax with "aaaaaaaa" a hexadecimal
  30.  *   string.  However, this causes problems when we link against the
  31.  *   X library which doesn't contain a routine named xopen_aaaaaaaax.
  32.  *   So, we use #define's to map all X routine names to lower case.
  33.  *   (Note that routines like BlackPixelOfScreen, which are [for VMS]
  34.  *   preprocessor macros, do not appear here.)
  35.  */
  36.  
  37. /*
  38.  * The names redefined here are those which the current Ghostscript X11
  39.  * driver happens to use: this list may grow in the future.
  40.  */
  41.  
  42. #    define XAllocColor            xalloccolor
  43. #    define XAllocNamedColor        xallocnamedcolor
  44. #    define XCloseDisplay        xclosedisplay
  45. #    define XCopyArea            xcopyarea
  46. #    define XCreateGC            xcreategc
  47. #    define XCreatePixmap        xcreatepixmap
  48. #    define XCreateWindow        xcreatewindow
  49. #    define XDisplayString        xdisplaystring
  50. #    define XDrawLine            xdrawline
  51. #    define XDrawString            xdrawstring
  52. #    define XFillPolygon        xfillpolygon
  53. #    define XFillRectangle        xfillrectangle
  54. #    define XFillRectangles        xfillrectangles
  55. #    define XFlush            xflush
  56. #    define XFree            xfree
  57. #    define XFreeColors            xfreecolors
  58. #    define XFreeFont            xfreefont
  59. #    define XFreeFontNames        xfreefontnames
  60. #    define XFreeGC            xfreegc
  61. #    define XFreePixmap            xfreepixmap
  62. #    define XGetDefault            xgetdefault
  63. #    define XGetGCValues        xgetgcvalues
  64. #    define XGetGeometry        xgetgeometry
  65. #    define XGetImage            xgetimage
  66. #    define XGetRGBColormaps        xgetrgbcolormaps
  67. #    define XGetVisualInfo        xgetvisualinfo
  68. #    define XGetWindowAttributes    xgetwindowattributes
  69. #    define XGetWindowProperty        xgetwindowproperty
  70. #    define XInternAtom            xinternatom
  71. #    define XListFonts            xlistfonts
  72. #    define XLoadQueryFont        xloadqueryfont
  73. #    define XMapWindow            xmapwindow
  74. #    define XNextEvent            xnextevent
  75. #    define XOpenDisplay        xopendisplay
  76. #    define XPutImage            xputimage
  77. #    define XQueryColor            xquerycolor
  78. #    define XResizeWindow        xresizewindow
  79. #    define XSendEvent            xsendevent
  80. #    define XSetBackground        xsetbackground
  81. #    define XSetClipMask        xsetclipmask
  82. #    define XSetClipOrigin        xsetcliporigin
  83. #    define XSetErrorHandler        xseterrorhandler
  84. #    define XSetFillStyle        xsetfillstyle
  85. #    define XSetFont            xsetfont
  86. #    define XSetForeground        xsetforeground
  87. #    define XSetFunction        xsetfunction
  88. #    define XSetLineAttributes        xsetlineattributes
  89. #    define XSetTile            xsettile
  90. #    define XSetWindowBackgroundPixmap    xsetwindowbackgroundpixmap
  91. #    define XSetWMHints            xsetwmhints
  92. #    define XSetWMNormalHints        xsetwmnormalhints
  93. #    define XStoreName            xstorename
  94. #    define XSync            xsync
  95. #    define XVisualIDFromVisual        xvisualidfromvisual
  96. #    define XWMGeometry            xwmgeometry
  97. #    define XtAppCreateShell        xtappcreateshell
  98. #    define XtCloseDisplay        xtclosedisplay
  99. #    define XtCreateApplicationContext    xtcreateapplicationcontext
  100. #    define XtDestroyApplicationContext    xtdestroyapplicationcontext
  101. #    define XtDestroyWidget        xtdestroywidget
  102. #    define XtGetApplicationResources    xtgetapplicationresources
  103. #    define XtOpenDisplay        xtopendisplay
  104. #    define XtToolkitInitialize        xttoolkitinitialize
  105.  
  106. #    define CADDR_T            /* Without this DEFINE, VAX GNUC    */
  107.                     /* gets trashed reading Intrinsic.h */
  108. #  endif                /* ifdef __GNUC__ */
  109.  
  110. #  include <decw$include/Xlib.h>
  111. #  include <decw$include/Xatom.h>
  112. #  include <decw$include/Xutil.h>
  113. #  include <decw$include/Intrinsic.h>
  114. #  include <decw$include/StringDefs.h>
  115. #  include <decw$include/Shell.h>
  116.  
  117. #else                    /* !ifdef VMS */
  118.  
  119. #  include <X11/Xlib.h>
  120. #  include <X11/Xatom.h>
  121. #  include <X11/Xutil.h>
  122. #  include <X11/Intrinsic.h>
  123. #  include <X11/StringDefs.h>
  124. #  include <X11/Shell.h>
  125.  
  126. #endif                    /* VMS */
  127.  
  128. /* X11R3 doesn't have XtOffsetOf, but it has XtOffset. */
  129. #ifndef XtOffsetOf
  130. #  ifdef offsetof
  131. #    define XtOffsetOf(s_type,field) offsetof(s_type,field)
  132. #  else
  133. #    define XtOffsetOf(s_type,field) XtOffset(s_type*,field)
  134. #  endif
  135. #endif
  136.  
  137. /* Include standard colormap stuff only for X11R4 and later. */
  138. #  if defined(XtSpecificationRelease) && (XtSpecificationRelease >= 4)
  139. #    define HaveStdCMap 1
  140. #  else
  141. #    define HaveStdCMap 0
  142. /* This function is not defined in R3. */
  143. #    undef XVisualIDFromVisual
  144. #    define XVisualIDFromVisual(vis) ((vis)->visualid)
  145. #  endif
  146.